package com.ellecity06.common.factory

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider

/**
 * @author ellecity06
 * @time 2023/4/25 15:33
 * @des
 */
class ViewModelFactory(
    private val create: () -> ViewModel
) : ViewModelProvider.Factory {
    override fun <T : ViewModel> create(modelClass: Class<T>): T {
        return create.invoke() as T

    }

}